package com.bnz.controller;

import com.bnz.pojo.Classes;
import com.bnz.service.ClassesService;
import com.bnz.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/classes")
public class ClassesController {
	@Autowired
	private ClassesService classesService;
	//1. 用户登录
	@RequestMapping("/list")
	public R login(){
		List<Classes> classesList = classesService.findAll();
		return R.ok().data("list",classesList);
	}


}
